#!/bin/sh
#desc:Send file by e-mail
#type:local
#package:email
FILE="/media/$1"
ODPATH="/usr/local/opendomo/services"
if ! test -f /etc/opendomo/email.conf; then
	echo "#ERR: e-mail settings not configured"
	exit 1
fi
if ! test /etc/opendomo/udata/admin/email; then
	echo "#ERR: User e-mail not specified"
	exit 2
fi
if test -f "$FILE"; then
	$ODPATH/syscript/eh_mail.sh void void "File requested" $FILE
fi

